
;; for utf8
DetectHiddenWindows,On
 ;SetTitleMatchMode,1
actMainWin()
{
	WinGet, active_id2, ID, ahk_class SunAwtFrame
		;MsgBox %active_id2%
		WinActivate,  ahk_class SunAwtFrame
		;act web frmk,only mouse mid key click
		MouseMove,10,100
		MouseClick,Middle
		 
		ControlFocus,Internet Explorer_Server
		ControlFocus,Internet Explorer_Server1



}

closePotUpInfo()
{
	   info_win=ahk_class #32770
	 IfWinExist,%info_win%
	{
	    WinClose,%info_win%
	}
	 info_win2=自动更新提示
	 IfWinExist,%info_win2%
	 {
		WinClose,%info_win2%
	 }

	 info_win3=开始播放时
	 IfWinExist,%info_win3%
	 {
		WinClose,%info_win3%
	 }
 
}

 


Loop
{
 ;  "D:\workspace\汉字 空格atibrow\AtiBrow\AutoHotKey\AutoHotkey.exe"  "D:\workspace\汉字 空格atibrow\AtiBrow\actPlayWin.potplyer.ahk"
 ;"c:\AutoHotKey\AutoHotkey.exe"  "D:\workspace\汉字 空格atibrow\AtiBrow\actPlayWin.ahk"
;-----------actplayer win
   player_title=ahk_class PotPlayer64
	WinGet, active_id, ID,%player_title%
	; MsgBox %active_id%
	WinActivate,%player_title%
	WinMaximize,%player_title%
 

;MsgBox  aa
;-------------------act  mainwin
	 IfWinNotExist,%player_title%
	 {
	    ; msgbox notWinPlayer
		WinGet, active_id2, ID, ahk_class SunAwtFrame
		;MsgBox %active_id2%
		WinActivate,  ahk_class SunAwtFrame
		;act web frmk,only mouse mid key click
		MouseMove,10,100
		MouseClick,Middle

		ControlFocus,Internet Explorer_Server
		ControlFocus,Internet Explorer_Server1


	}
;msgbox tt
closePotUpInfo()
Sleep, 3000
}

#c:: ExitApp
^c:: ExitApp


 